<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8" />
    <title>数学对象</title>
    <script>
        //常见属性
        //console.log(Math.PI);

        //常见方法

        //round
        /* console.log(Math.round(1.4));
        console.log(Math.round(1.5)); */

        //floor向下取整
        /* console.log(Math.floor(1.8));
        console.log(Math.floor(-1.8)); */

        //ceil向上取整
        //console.log(Math.ceil(-1.2));

        //abs取绝对值
        /* console.log(Math.abs(5));
        console.log(Math.abs(-5));*/

        //min 最小值
        //console.log(Math.min(20, 30));

        //max 最大值
        //console.log(Math.max(20, 30));

        //pow 次方
        //console.log(Math.pow(2, 4));

        //random 随机数  0-1之间
        console.log(Math.random());

    </script>
</head>

<body>
</body>